home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 622 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mik.uky.edu!mgwill1
  2. From: mgwill1@mik.uky.edu (matthew williams)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: HUGE executable in g++
  5. Date: 9 Jan 96 14:22:38 GMT
  6. Organization: University of Kentucky, Dept. of Math Sciences
  7. Message-ID: <mgwill1.821197358@mik.uky.edu>
  8. NNTP-Posting-Host: 128.163.117.20
  9.  
  10.  
  11. I have been having a problem with GNU G++, I have a 10k source file that 
  12. only includes the files iostream.h, iomanip.h, and stdio.h (i wrote it 
  13. first with fstream.h but rewrote the code to use stdio.h because i 
  14. thought fstream.h was making my executable large) and this 10k compiles 
  15. into a 1454344 byte executable! (in a.out form) and nothing seems to make 
  16. it into a reasonably sized executable, i compiled the program with this line:
  17.  
  18. g++ -O2 -noixemul foo.cc -o foo -lnix
  19.  
  20. The file produced by that is 541k (which is better but not good) and 
  21. when i try to run it, CLI says file not executable and the programs 
  22. execution flag is set! I dont know if this is GNU C++s fault or my own, 
  23. the only thing i can think of why i cannot get a reseanably sized 
  24. executable is that GNU C++ crashed my hard drive, and that i didnt 
  25. replace all the corrupt files, but id think that if that was the case g++ 
  26. wouldnt work at all. If anyone has any insight on this please clue me in, 
  27. also if you know of any options to call g++ that helps make more compact 
  28. executables please let me know. Thanks
  29.